home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / addr.rpl < prev    next >
Text File  |  1990-10-20  |  1KB  |  36 lines

  1. %%HP:T(3);
  2. @ By Rick Grevelle
  3. @ ADDR
  4. @
  5. @ Returns the address of the object in stack level 1.
  6. @
  7. \<<
  8.   "D9D20"    @ Begin            ; 02D9D
  9.   "E1632" +    @ \<<            ; 2361E
  10.   "9C2A2" +    @   1            ; 2A2C9
  11.   "6C7D1" +    @   GET            ; 1D7C6
  12.   "E4A20510000000000000000000" +    ;
  13.         @   # 0h        ;
  14.   "CB2A1" +    @   NEWOB        ; 1A2BC
  15.   "CCD20" +    @   In-line code    ; 02DCC
  16.   "B2000" +    @     Code length = 43    ; 0002B
  17.   "174" +    @     D1=D1+ 5        ; Point to LVL2
  18.   "AF0" +    @     A=0    W        ; Clear A
  19.   "143" +    @     A=DAT1 A        ; Copy (LVL2) to A
  20.   "1C4" +    @     D1=D1- 5        ; Point back to LVL1
  21.   "147" +    @     C=DAT1 A        ; C = LVL1
  22.   "137" +    @     CD1EX        ; Swap C and D1
  23.   "179" +    @     D1=D1+ 10        ; Skip prolog and length
  24.   "159F" +    @     DAT1=A 16        ; Copy (LVL2) into LVL1 int
  25.   "137" +    @     CD1EX        ; Restore D1
  26.   "142" +    @     A=DAT0 A        ; End
  27.   "164" +    @     D0=D0+ 5        ;   of
  28.   "808C" +    @     PC=(A)        ;    Routine
  29.   "DBBF1" +    @   SWAP        ; 1FBBD
  30.   "8DBF1" +    @   DROP        ; 1FBD8
  31.   "93632" +    @ \>>            ; 23639
  32.   "B2130" +    @ End            ; 0312B
  33.   STR\->OBJ
  34.   'ADDR' STO
  35. \>>
  36.